//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS LookoutMetrics service.
///
/// This is the Amazon Lookout for Metrics API Reference. For an introduction to the service with tutorials for getting started, visit Amazon Lookout for Metrics Developer Guide.
public struct LookoutMetrics: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the LookoutMetrics client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "LookoutMetrics",
            serviceIdentifier: "lookoutmetrics",
            serviceProtocol: .restjson,
            apiVersion: "2017-07-25",
            endpoint: endpoint,
            errorType: LookoutMetricsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Activates an anomaly detector.
    @Sendable
    @inlinable
    public func activateAnomalyDetector(_ input: ActivateAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ActivateAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "ActivateAnomalyDetector", 
            path: "/ActivateAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Activates an anomaly detector.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the anomaly detector.
    ///   - logger: Logger use during operation
    @inlinable
    public func activateAnomalyDetector(
        anomalyDetectorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ActivateAnomalyDetectorResponse {
        let input = ActivateAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn
        )
        return try await self.activateAnomalyDetector(input, logger: logger)
    }

    /// Runs a backtest for anomaly detection for the specified resource.
    @Sendable
    @inlinable
    public func backTestAnomalyDetector(_ input: BackTestAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BackTestAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "BackTestAnomalyDetector", 
            path: "/BackTestAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Runs a backtest for anomaly detection for the specified resource.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - logger: Logger use during operation
    @inlinable
    public func backTestAnomalyDetector(
        anomalyDetectorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BackTestAnomalyDetectorResponse {
        let input = BackTestAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn
        )
        return try await self.backTestAnomalyDetector(input, logger: logger)
    }

    /// Creates an alert for an anomaly detector.
    @Sendable
    @inlinable
    public func createAlert(_ input: CreateAlertRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAlertResponse {
        try await self.client.execute(
            operation: "CreateAlert", 
            path: "/CreateAlert", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an alert for an anomaly detector.
    ///
    /// Parameters:
    ///   - action: Action that will be triggered when there is an alert.
    ///   - alertDescription: A description of the alert.
    ///   - alertFilters: The configuration of the alert filters, containing MetricList and DimensionFilterList.
    ///   - alertName: The name of the alert.
    ///   - alertSensitivityThreshold: An integer from 0 to 100 specifying the alert sensitivity threshold.
    ///   - anomalyDetectorArn: The ARN of the detector to which the alert is attached.
    ///   - tags: A list of tags to apply to the alert.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAlert(
        action: Action,
        alertDescription: String? = nil,
        alertFilters: AlertFilters? = nil,
        alertName: String,
        alertSensitivityThreshold: Int? = nil,
        anomalyDetectorArn: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAlertResponse {
        let input = CreateAlertRequest(
            action: action, 
            alertDescription: alertDescription, 
            alertFilters: alertFilters, 
            alertName: alertName, 
            alertSensitivityThreshold: alertSensitivityThreshold, 
            anomalyDetectorArn: anomalyDetectorArn, 
            tags: tags
        )
        return try await self.createAlert(input, logger: logger)
    }

    /// Creates an anomaly detector.
    @Sendable
    @inlinable
    public func createAnomalyDetector(_ input: CreateAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "CreateAnomalyDetector", 
            path: "/CreateAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an anomaly detector.
    ///
    /// Parameters:
    ///   - anomalyDetectorConfig: Contains information about the configuration of the anomaly detector.
    ///   - anomalyDetectorDescription: A description of the detector.
    ///   - anomalyDetectorName: The name of the detector.
    ///   - kmsKeyArn: The ARN of the KMS key to use to encrypt your data.
    ///   - tags: A list of tags to apply to the anomaly detector.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAnomalyDetector(
        anomalyDetectorConfig: AnomalyDetectorConfig,
        anomalyDetectorDescription: String? = nil,
        anomalyDetectorName: String,
        kmsKeyArn: String? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAnomalyDetectorResponse {
        let input = CreateAnomalyDetectorRequest(
            anomalyDetectorConfig: anomalyDetectorConfig, 
            anomalyDetectorDescription: anomalyDetectorDescription, 
            anomalyDetectorName: anomalyDetectorName, 
            kmsKeyArn: kmsKeyArn, 
            tags: tags
        )
        return try await self.createAnomalyDetector(input, logger: logger)
    }

    /// Creates a dataset.
    @Sendable
    @inlinable
    public func createMetricSet(_ input: CreateMetricSetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateMetricSetResponse {
        try await self.client.execute(
            operation: "CreateMetricSet", 
            path: "/CreateMetricSet", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a dataset.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the anomaly detector that will use the dataset.
    ///   - dimensionFilterList: A list of filters that specify which data is kept for anomaly detection.
    ///   - dimensionList: A list of the fields you want to treat as dimensions.
    ///   - metricList: A list of metrics that the dataset will contain.
    ///   - metricSetDescription: A description of the dataset you are creating.
    ///   - metricSetFrequency: The frequency with which the source data will be analyzed for anomalies.
    ///   - metricSetName: The name of the dataset.
    ///   - metricSource: Contains information about how the source data should be interpreted.
    ///   - offset: After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
    ///   - tags: A list of tags to apply to the dataset.
    ///   - timestampColumn: Contains information about the column used for tracking time in your source data.
    ///   - timezone: The time zone in which your source data was recorded.
    ///   - logger: Logger use during operation
    @inlinable
    public func createMetricSet(
        anomalyDetectorArn: String,
        dimensionFilterList: [MetricSetDimensionFilter]? = nil,
        dimensionList: [String]? = nil,
        metricList: [Metric],
        metricSetDescription: String? = nil,
        metricSetFrequency: Frequency? = nil,
        metricSetName: String,
        metricSource: MetricSource,
        offset: Int? = nil,
        tags: [String: String]? = nil,
        timestampColumn: TimestampColumn? = nil,
        timezone: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateMetricSetResponse {
        let input = CreateMetricSetRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            dimensionFilterList: dimensionFilterList, 
            dimensionList: dimensionList, 
            metricList: metricList, 
            metricSetDescription: metricSetDescription, 
            metricSetFrequency: metricSetFrequency, 
            metricSetName: metricSetName, 
            metricSource: metricSource, 
            offset: offset, 
            tags: tags, 
            timestampColumn: timestampColumn, 
            timezone: timezone
        )
        return try await self.createMetricSet(input, logger: logger)
    }

    /// Deactivates an anomaly detector.
    @Sendable
    @inlinable
    public func deactivateAnomalyDetector(_ input: DeactivateAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeactivateAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "DeactivateAnomalyDetector", 
            path: "/DeactivateAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deactivates an anomaly detector.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - logger: Logger use during operation
    @inlinable
    public func deactivateAnomalyDetector(
        anomalyDetectorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeactivateAnomalyDetectorResponse {
        let input = DeactivateAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn
        )
        return try await self.deactivateAnomalyDetector(input, logger: logger)
    }

    /// Deletes an alert.
    @Sendable
    @inlinable
    public func deleteAlert(_ input: DeleteAlertRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAlertResponse {
        try await self.client.execute(
            operation: "DeleteAlert", 
            path: "/DeleteAlert", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an alert.
    ///
    /// Parameters:
    ///   - alertArn: The ARN of the alert to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAlert(
        alertArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAlertResponse {
        let input = DeleteAlertRequest(
            alertArn: alertArn
        )
        return try await self.deleteAlert(input, logger: logger)
    }

    /// Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any configured datasets and alerts.
    @Sendable
    @inlinable
    public func deleteAnomalyDetector(_ input: DeleteAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "DeleteAnomalyDetector", 
            path: "/DeleteAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any configured datasets and alerts.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the detector to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAnomalyDetector(
        anomalyDetectorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAnomalyDetectorResponse {
        let input = DeleteAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn
        )
        return try await self.deleteAnomalyDetector(input, logger: logger)
    }

    /// Describes an alert. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func describeAlert(_ input: DescribeAlertRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAlertResponse {
        try await self.client.execute(
            operation: "DescribeAlert", 
            path: "/DescribeAlert", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes an alert. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - alertArn: The ARN of the alert to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAlert(
        alertArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAlertResponse {
        let input = DescribeAlertRequest(
            alertArn: alertArn
        )
        return try await self.describeAlert(input, logger: logger)
    }

    /// Returns information about the status of the specified anomaly detection jobs.
    @Sendable
    @inlinable
    public func describeAnomalyDetectionExecutions(_ input: DescribeAnomalyDetectionExecutionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAnomalyDetectionExecutionsResponse {
        try await self.client.execute(
            operation: "DescribeAnomalyDetectionExecutions", 
            path: "/DescribeAnomalyDetectionExecutions", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the status of the specified anomaly detection jobs.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - maxResults: The number of items to return in the response.
    ///   - nextToken: Specify the pagination token that's returned by a previous request to retrieve the next page of results.
    ///   - timestamp: The timestamp of the anomaly detection job.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAnomalyDetectionExecutions(
        anomalyDetectorArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        timestamp: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAnomalyDetectionExecutionsResponse {
        let input = DescribeAnomalyDetectionExecutionsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            timestamp: timestamp
        )
        return try await self.describeAnomalyDetectionExecutions(input, logger: logger)
    }

    /// Describes a detector. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func describeAnomalyDetector(_ input: DescribeAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "DescribeAnomalyDetector", 
            path: "/DescribeAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a detector. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the detector to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeAnomalyDetector(
        anomalyDetectorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeAnomalyDetectorResponse {
        let input = DescribeAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn
        )
        return try await self.describeAnomalyDetector(input, logger: logger)
    }

    /// Describes a dataset. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func describeMetricSet(_ input: DescribeMetricSetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeMetricSetResponse {
        try await self.client.execute(
            operation: "DescribeMetricSet", 
            path: "/DescribeMetricSet", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a dataset. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - metricSetArn: The ARN of the dataset.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeMetricSet(
        metricSetArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeMetricSetResponse {
        let input = DescribeMetricSetRequest(
            metricSetArn: metricSetArn
        )
        return try await self.describeMetricSet(input, logger: logger)
    }

    /// Detects an Amazon S3 dataset's file format, interval, and offset.
    @Sendable
    @inlinable
    public func detectMetricSetConfig(_ input: DetectMetricSetConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DetectMetricSetConfigResponse {
        try await self.client.execute(
            operation: "DetectMetricSetConfig", 
            path: "/DetectMetricSetConfig", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Detects an Amazon S3 dataset's file format, interval, and offset.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: An anomaly detector ARN.
    ///   - autoDetectionMetricSource: A data source.
    ///   - logger: Logger use during operation
    @inlinable
    public func detectMetricSetConfig(
        anomalyDetectorArn: String,
        autoDetectionMetricSource: AutoDetectionMetricSource,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DetectMetricSetConfigResponse {
        let input = DetectMetricSetConfigRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            autoDetectionMetricSource: autoDetectionMetricSource
        )
        return try await self.detectMetricSetConfig(input, logger: logger)
    }

    /// Returns details about a group of anomalous metrics.
    @Sendable
    @inlinable
    public func getAnomalyGroup(_ input: GetAnomalyGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAnomalyGroupResponse {
        try await self.client.execute(
            operation: "GetAnomalyGroup", 
            path: "/GetAnomalyGroup", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns details about a group of anomalous metrics.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupId: The ID of the anomaly group.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAnomalyGroup(
        anomalyDetectorArn: String,
        anomalyGroupId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAnomalyGroupResponse {
        let input = GetAnomalyGroupRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupId: anomalyGroupId
        )
        return try await self.getAnomalyGroup(input, logger: logger)
    }

    /// Returns details about the requested data quality metrics.
    @Sendable
    @inlinable
    public func getDataQualityMetrics(_ input: GetDataQualityMetricsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataQualityMetricsResponse {
        try await self.client.execute(
            operation: "GetDataQualityMetrics", 
            path: "/GetDataQualityMetrics", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns details about the requested data quality metrics.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector that you want to investigate.
    ///   - metricSetArn: The Amazon Resource Name (ARN) of a specific data quality metric set.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDataQualityMetrics(
        anomalyDetectorArn: String,
        metricSetArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataQualityMetricsResponse {
        let input = GetDataQualityMetricsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            metricSetArn: metricSetArn
        )
        return try await self.getDataQualityMetrics(input, logger: logger)
    }

    /// Get feedback for an anomaly group.
    @Sendable
    @inlinable
    public func getFeedback(_ input: GetFeedbackRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetFeedbackResponse {
        try await self.client.execute(
            operation: "GetFeedback", 
            path: "/GetFeedback", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get feedback for an anomaly group.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupTimeSeriesFeedback: The anomalous metric and group ID.
    ///   - maxResults: The maximum number of results to return.
    ///   - nextToken: Specify the pagination token that's returned by a previous request to retrieve the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func getFeedback(
        anomalyDetectorArn: String,
        anomalyGroupTimeSeriesFeedback: AnomalyGroupTimeSeries,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetFeedbackResponse {
        let input = GetFeedbackRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupTimeSeriesFeedback: anomalyGroupTimeSeriesFeedback, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.getFeedback(input, logger: logger)
    }

    /// Returns a selection of sample records from an Amazon S3 datasource.
    @Sendable
    @inlinable
    public func getSampleData(_ input: GetSampleDataRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSampleDataResponse {
        try await self.client.execute(
            operation: "GetSampleData", 
            path: "/GetSampleData", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a selection of sample records from an Amazon S3 datasource.
    ///
    /// Parameters:
    ///   - s3SourceConfig: A datasource bucket in Amazon S3.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSampleData(
        s3SourceConfig: SampleDataS3SourceConfig? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSampleDataResponse {
        let input = GetSampleDataRequest(
            s3SourceConfig: s3SourceConfig
        )
        return try await self.getSampleData(input, logger: logger)
    }

    /// Lists the alerts attached to a detector. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func listAlerts(_ input: ListAlertsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAlertsResponse {
        try await self.client.execute(
            operation: "ListAlerts", 
            path: "/ListAlerts", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the alerts attached to a detector. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the alert's detector.
    ///   - maxResults: The maximum number of results that will be displayed by the request.
    ///   - nextToken: If the result of the previous request is truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAlerts(
        anomalyDetectorArn: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAlertsResponse {
        let input = ListAlertsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAlerts(input, logger: logger)
    }

    /// Lists the detectors in the current AWS Region. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func listAnomalyDetectors(_ input: ListAnomalyDetectorsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAnomalyDetectorsResponse {
        try await self.client.execute(
            operation: "ListAnomalyDetectors", 
            path: "/ListAnomalyDetectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the detectors in the current AWS Region. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return.
    ///   - nextToken: If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAnomalyDetectors(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAnomalyDetectorsResponse {
        let input = ListAnomalyDetectorsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAnomalyDetectors(input, logger: logger)
    }

    /// Returns a list of measures that are potential causes or effects of an anomaly group.
    @Sendable
    @inlinable
    public func listAnomalyGroupRelatedMetrics(_ input: ListAnomalyGroupRelatedMetricsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAnomalyGroupRelatedMetricsResponse {
        try await self.client.execute(
            operation: "ListAnomalyGroupRelatedMetrics", 
            path: "/ListAnomalyGroupRelatedMetrics", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of measures that are potential causes or effects of an anomaly group.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupId: The ID of the anomaly group.
    ///   - maxResults: The maximum number of results to return.
    ///   - nextToken: Specify the pagination token that's returned by a previous request to retrieve the next page of results.
    ///   - relationshipTypeFilter: Filter for potential causes (CAUSE_OF_INPUT_ANOMALY_GROUP) or downstream effects (EFFECT_OF_INPUT_ANOMALY_GROUP) of the anomaly group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAnomalyGroupRelatedMetrics(
        anomalyDetectorArn: String,
        anomalyGroupId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        relationshipTypeFilter: RelationshipType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAnomalyGroupRelatedMetricsResponse {
        let input = ListAnomalyGroupRelatedMetricsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupId: anomalyGroupId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            relationshipTypeFilter: relationshipTypeFilter
        )
        return try await self.listAnomalyGroupRelatedMetrics(input, logger: logger)
    }

    /// Returns a list of anomaly groups.
    @Sendable
    @inlinable
    public func listAnomalyGroupSummaries(_ input: ListAnomalyGroupSummariesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAnomalyGroupSummariesResponse {
        try await self.client.execute(
            operation: "ListAnomalyGroupSummaries", 
            path: "/ListAnomalyGroupSummaries", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of anomaly groups.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - maxResults: The maximum number of results to return.
    ///   - nextToken: Specify the pagination token that's returned by a previous request to retrieve the next page of results.
    ///   - sensitivityThreshold: The minimum severity score for inclusion in the output.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAnomalyGroupSummaries(
        anomalyDetectorArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        sensitivityThreshold: Int = 0,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAnomalyGroupSummariesResponse {
        let input = ListAnomalyGroupSummariesRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            sensitivityThreshold: sensitivityThreshold
        )
        return try await self.listAnomalyGroupSummaries(input, logger: logger)
    }

    /// Gets a list of anomalous metrics for a measure in an anomaly group.
    @Sendable
    @inlinable
    public func listAnomalyGroupTimeSeries(_ input: ListAnomalyGroupTimeSeriesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAnomalyGroupTimeSeriesResponse {
        try await self.client.execute(
            operation: "ListAnomalyGroupTimeSeries", 
            path: "/ListAnomalyGroupTimeSeries", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a list of anomalous metrics for a measure in an anomaly group.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupId: The ID of the anomaly group.
    ///   - maxResults: The maximum number of results to return.
    ///   - metricName: The name of the measure field.
    ///   - nextToken: Specify the pagination token that's returned by a previous request to retrieve the next page of results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAnomalyGroupTimeSeries(
        anomalyDetectorArn: String,
        anomalyGroupId: String,
        maxResults: Int? = nil,
        metricName: String,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAnomalyGroupTimeSeriesResponse {
        let input = ListAnomalyGroupTimeSeriesRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupId: anomalyGroupId, 
            maxResults: maxResults, 
            metricName: metricName, 
            nextToken: nextToken
        )
        return try await self.listAnomalyGroupTimeSeries(input, logger: logger)
    }

    /// Lists the datasets in the current AWS Region. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    @Sendable
    @inlinable
    public func listMetricSets(_ input: ListMetricSetsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListMetricSetsResponse {
        try await self.client.execute(
            operation: "ListMetricSets", 
            path: "/ListMetricSets", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the datasets in the current AWS Region. Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the anomaly detector containing the metrics sets to list.
    ///   - maxResults: The maximum number of results to return.
    ///   - nextToken: If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
    ///   - logger: Logger use during operation
    @inlinable
    public func listMetricSets(
        anomalyDetectorArn: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListMetricSetsResponse {
        let input = ListMetricSetsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listMetricSets(input, logger: logger)
    }

    /// Gets a list of tags for a detector, dataset, or alert.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a list of tags for a detector, dataset, or alert.
    ///
    /// Parameters:
    ///   - resourceArn: The resource's Amazon Resource Name (ARN).
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Add feedback for an anomalous metric.
    @Sendable
    @inlinable
    public func putFeedback(_ input: PutFeedbackRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutFeedbackResponse {
        try await self.client.execute(
            operation: "PutFeedback", 
            path: "/PutFeedback", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add feedback for an anomalous metric.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupTimeSeriesFeedback: Feedback for an anomalous metric.
    ///   - logger: Logger use during operation
    @inlinable
    public func putFeedback(
        anomalyDetectorArn: String,
        anomalyGroupTimeSeriesFeedback: AnomalyGroupTimeSeriesFeedback,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutFeedbackResponse {
        let input = PutFeedbackRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupTimeSeriesFeedback: anomalyGroupTimeSeriesFeedback
        )
        return try await self.putFeedback(input, logger: logger)
    }

    /// Adds tags to a detector, dataset, or alert.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds tags to a detector, dataset, or alert.
    ///
    /// Parameters:
    ///   - resourceArn: The resource's Amazon Resource Name (ARN).
    ///   - tags: Tags to apply to the resource. Tag keys and values can contain letters, numbers, spaces, and the following symbols: _.:/=+@-
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes tags from a detector, dataset, or alert.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes tags from a detector, dataset, or alert.
    ///
    /// Parameters:
    ///   - resourceArn: The resource's Amazon Resource Name (ARN).
    ///   - tagKeys: Keys to remove from the resource's tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Make changes to an existing alert.
    @Sendable
    @inlinable
    public func updateAlert(_ input: UpdateAlertRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAlertResponse {
        try await self.client.execute(
            operation: "UpdateAlert", 
            path: "/UpdateAlert", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Make changes to an existing alert.
    ///
    /// Parameters:
    ///   - action: Action that will be triggered when there is an alert.
    ///   - alertArn: The ARN of the alert to update.
    ///   - alertDescription: A description of the alert.
    ///   - alertFilters: The configuration of the alert filters, containing MetricList and DimensionFilterList.
    ///   - alertSensitivityThreshold: An integer from 0 to 100 specifying the alert sensitivity threshold.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAlert(
        action: Action? = nil,
        alertArn: String,
        alertDescription: String? = nil,
        alertFilters: AlertFilters? = nil,
        alertSensitivityThreshold: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAlertResponse {
        let input = UpdateAlertRequest(
            action: action, 
            alertArn: alertArn, 
            alertDescription: alertDescription, 
            alertFilters: alertFilters, 
            alertSensitivityThreshold: alertSensitivityThreshold
        )
        return try await self.updateAlert(input, logger: logger)
    }

    /// Updates a detector. After activation, you can only change a detector's ingestion delay and description.
    @Sendable
    @inlinable
    public func updateAnomalyDetector(_ input: UpdateAnomalyDetectorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateAnomalyDetectorResponse {
        try await self.client.execute(
            operation: "UpdateAnomalyDetector", 
            path: "/UpdateAnomalyDetector", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a detector. After activation, you can only change a detector's ingestion delay and description.
    ///
    /// Parameters:
    ///   - anomalyDetectorArn: The ARN of the detector to update.
    ///   - anomalyDetectorConfig: Contains information about the configuration to which the detector will be updated.
    ///   - anomalyDetectorDescription: The updated detector description.
    ///   - kmsKeyArn: The Amazon Resource Name (ARN) of an AWS KMS encryption key.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateAnomalyDetector(
        anomalyDetectorArn: String,
        anomalyDetectorConfig: AnomalyDetectorConfig? = nil,
        anomalyDetectorDescription: String? = nil,
        kmsKeyArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateAnomalyDetectorResponse {
        let input = UpdateAnomalyDetectorRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyDetectorConfig: anomalyDetectorConfig, 
            anomalyDetectorDescription: anomalyDetectorDescription, 
            kmsKeyArn: kmsKeyArn
        )
        return try await self.updateAnomalyDetector(input, logger: logger)
    }

    /// Updates a dataset.
    @Sendable
    @inlinable
    public func updateMetricSet(_ input: UpdateMetricSetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateMetricSetResponse {
        try await self.client.execute(
            operation: "UpdateMetricSet", 
            path: "/UpdateMetricSet", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a dataset.
    ///
    /// Parameters:
    ///   - dimensionFilterList: Describes a list of filters for choosing specific dimensions and specific values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
    ///   - dimensionList: The dimension list.
    ///   - metricList: The metric list.
    ///   - metricSetArn: The ARN of the dataset to update.
    ///   - metricSetDescription: The dataset's description.
    ///   - metricSetFrequency: The dataset's interval.
    ///   - metricSource: 
    ///   - offset: After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
    ///   - timestampColumn: The timestamp column.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateMetricSet(
        dimensionFilterList: [MetricSetDimensionFilter]? = nil,
        dimensionList: [String]? = nil,
        metricList: [Metric]? = nil,
        metricSetArn: String,
        metricSetDescription: String? = nil,
        metricSetFrequency: Frequency? = nil,
        metricSource: MetricSource? = nil,
        offset: Int? = nil,
        timestampColumn: TimestampColumn? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateMetricSetResponse {
        let input = UpdateMetricSetRequest(
            dimensionFilterList: dimensionFilterList, 
            dimensionList: dimensionList, 
            metricList: metricList, 
            metricSetArn: metricSetArn, 
            metricSetDescription: metricSetDescription, 
            metricSetFrequency: metricSetFrequency, 
            metricSource: metricSource, 
            offset: offset, 
            timestampColumn: timestampColumn
        )
        return try await self.updateMetricSet(input, logger: logger)
    }
}

extension LookoutMetrics {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: LookoutMetrics, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension LookoutMetrics {
    /// Return PaginatorSequence for operation ``describeAnomalyDetectionExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeAnomalyDetectionExecutionsPaginator(
        _ input: DescribeAnomalyDetectionExecutionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeAnomalyDetectionExecutionsRequest, DescribeAnomalyDetectionExecutionsResponse> {
        return .init(
            input: input,
            command: self.describeAnomalyDetectionExecutions,
            inputKey: \DescribeAnomalyDetectionExecutionsRequest.nextToken,
            outputKey: \DescribeAnomalyDetectionExecutionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeAnomalyDetectionExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - maxResults: The number of items to return in the response.
    ///   - timestamp: The timestamp of the anomaly detection job.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeAnomalyDetectionExecutionsPaginator(
        anomalyDetectorArn: String,
        maxResults: Int? = nil,
        timestamp: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeAnomalyDetectionExecutionsRequest, DescribeAnomalyDetectionExecutionsResponse> {
        let input = DescribeAnomalyDetectionExecutionsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            timestamp: timestamp
        )
        return self.describeAnomalyDetectionExecutionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getFeedback(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getFeedbackPaginator(
        _ input: GetFeedbackRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetFeedbackRequest, GetFeedbackResponse> {
        return .init(
            input: input,
            command: self.getFeedback,
            inputKey: \GetFeedbackRequest.nextToken,
            outputKey: \GetFeedbackResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getFeedback(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupTimeSeriesFeedback: The anomalous metric and group ID.
    ///   - maxResults: The maximum number of results to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func getFeedbackPaginator(
        anomalyDetectorArn: String,
        anomalyGroupTimeSeriesFeedback: AnomalyGroupTimeSeries,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetFeedbackRequest, GetFeedbackResponse> {
        let input = GetFeedbackRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupTimeSeriesFeedback: anomalyGroupTimeSeriesFeedback, 
            maxResults: maxResults
        )
        return self.getFeedbackPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAlerts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAlertsPaginator(
        _ input: ListAlertsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAlertsRequest, ListAlertsResponse> {
        return .init(
            input: input,
            command: self.listAlerts,
            inputKey: \ListAlertsRequest.nextToken,
            outputKey: \ListAlertsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAlerts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The ARN of the alert's detector.
    ///   - maxResults: The maximum number of results that will be displayed by the request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAlertsPaginator(
        anomalyDetectorArn: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAlertsRequest, ListAlertsResponse> {
        let input = ListAlertsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults
        )
        return self.listAlertsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAnomalyDetectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyDetectorsPaginator(
        _ input: ListAnomalyDetectorsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAnomalyDetectorsRequest, ListAnomalyDetectorsResponse> {
        return .init(
            input: input,
            command: self.listAnomalyDetectors,
            inputKey: \ListAnomalyDetectorsRequest.nextToken,
            outputKey: \ListAnomalyDetectorsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAnomalyDetectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyDetectorsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAnomalyDetectorsRequest, ListAnomalyDetectorsResponse> {
        let input = ListAnomalyDetectorsRequest(
            maxResults: maxResults
        )
        return self.listAnomalyDetectorsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAnomalyGroupRelatedMetrics(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupRelatedMetricsPaginator(
        _ input: ListAnomalyGroupRelatedMetricsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupRelatedMetricsRequest, ListAnomalyGroupRelatedMetricsResponse> {
        return .init(
            input: input,
            command: self.listAnomalyGroupRelatedMetrics,
            inputKey: \ListAnomalyGroupRelatedMetricsRequest.nextToken,
            outputKey: \ListAnomalyGroupRelatedMetricsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAnomalyGroupRelatedMetrics(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupId: The ID of the anomaly group.
    ///   - maxResults: The maximum number of results to return.
    ///   - relationshipTypeFilter: Filter for potential causes (CAUSE_OF_INPUT_ANOMALY_GROUP) or downstream effects (EFFECT_OF_INPUT_ANOMALY_GROUP) of the anomaly group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupRelatedMetricsPaginator(
        anomalyDetectorArn: String,
        anomalyGroupId: String,
        maxResults: Int? = nil,
        relationshipTypeFilter: RelationshipType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupRelatedMetricsRequest, ListAnomalyGroupRelatedMetricsResponse> {
        let input = ListAnomalyGroupRelatedMetricsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupId: anomalyGroupId, 
            maxResults: maxResults, 
            relationshipTypeFilter: relationshipTypeFilter
        )
        return self.listAnomalyGroupRelatedMetricsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAnomalyGroupSummaries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupSummariesPaginator(
        _ input: ListAnomalyGroupSummariesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupSummariesRequest, ListAnomalyGroupSummariesResponse> {
        return .init(
            input: input,
            command: self.listAnomalyGroupSummaries,
            inputKey: \ListAnomalyGroupSummariesRequest.nextToken,
            outputKey: \ListAnomalyGroupSummariesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAnomalyGroupSummaries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - maxResults: The maximum number of results to return.
    ///   - sensitivityThreshold: The minimum severity score for inclusion in the output.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupSummariesPaginator(
        anomalyDetectorArn: String,
        maxResults: Int? = nil,
        sensitivityThreshold: Int = 0,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupSummariesRequest, ListAnomalyGroupSummariesResponse> {
        let input = ListAnomalyGroupSummariesRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults, 
            sensitivityThreshold: sensitivityThreshold
        )
        return self.listAnomalyGroupSummariesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAnomalyGroupTimeSeries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupTimeSeriesPaginator(
        _ input: ListAnomalyGroupTimeSeriesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupTimeSeriesRequest, ListAnomalyGroupTimeSeriesResponse> {
        return .init(
            input: input,
            command: self.listAnomalyGroupTimeSeries,
            inputKey: \ListAnomalyGroupTimeSeriesRequest.nextToken,
            outputKey: \ListAnomalyGroupTimeSeriesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAnomalyGroupTimeSeries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The Amazon Resource Name (ARN) of the anomaly detector.
    ///   - anomalyGroupId: The ID of the anomaly group.
    ///   - maxResults: The maximum number of results to return.
    ///   - metricName: The name of the measure field.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnomalyGroupTimeSeriesPaginator(
        anomalyDetectorArn: String,
        anomalyGroupId: String,
        maxResults: Int? = nil,
        metricName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAnomalyGroupTimeSeriesRequest, ListAnomalyGroupTimeSeriesResponse> {
        let input = ListAnomalyGroupTimeSeriesRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            anomalyGroupId: anomalyGroupId, 
            maxResults: maxResults, 
            metricName: metricName
        )
        return self.listAnomalyGroupTimeSeriesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listMetricSets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listMetricSetsPaginator(
        _ input: ListMetricSetsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListMetricSetsRequest, ListMetricSetsResponse> {
        return .init(
            input: input,
            command: self.listMetricSets,
            inputKey: \ListMetricSetsRequest.nextToken,
            outputKey: \ListMetricSetsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listMetricSets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - anomalyDetectorArn: The ARN of the anomaly detector containing the metrics sets to list.
    ///   - maxResults: The maximum number of results to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listMetricSetsPaginator(
        anomalyDetectorArn: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListMetricSetsRequest, ListMetricSetsResponse> {
        let input = ListMetricSetsRequest(
            anomalyDetectorArn: anomalyDetectorArn, 
            maxResults: maxResults
        )
        return self.listMetricSetsPaginator(input, logger: logger)
    }
}

extension LookoutMetrics.DescribeAnomalyDetectionExecutionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.DescribeAnomalyDetectionExecutionsRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            maxResults: self.maxResults,
            nextToken: token,
            timestamp: self.timestamp
        )
    }
}

extension LookoutMetrics.GetFeedbackRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.GetFeedbackRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            anomalyGroupTimeSeriesFeedback: self.anomalyGroupTimeSeriesFeedback,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension LookoutMetrics.ListAlertsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListAlertsRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension LookoutMetrics.ListAnomalyDetectorsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListAnomalyDetectorsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension LookoutMetrics.ListAnomalyGroupRelatedMetricsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListAnomalyGroupRelatedMetricsRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            anomalyGroupId: self.anomalyGroupId,
            maxResults: self.maxResults,
            nextToken: token,
            relationshipTypeFilter: self.relationshipTypeFilter
        )
    }
}

extension LookoutMetrics.ListAnomalyGroupSummariesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListAnomalyGroupSummariesRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            maxResults: self.maxResults,
            nextToken: token,
            sensitivityThreshold: self.sensitivityThreshold
        )
    }
}

extension LookoutMetrics.ListAnomalyGroupTimeSeriesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListAnomalyGroupTimeSeriesRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            anomalyGroupId: self.anomalyGroupId,
            maxResults: self.maxResults,
            metricName: self.metricName,
            nextToken: token
        )
    }
}

extension LookoutMetrics.ListMetricSetsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutMetrics.ListMetricSetsRequest {
        return .init(
            anomalyDetectorArn: self.anomalyDetectorArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
